<template>
  <div class="app-container">
    <!-- 顶部区域 - 仅保留Logo和名称 -->
    <header class="app-header">
      <el-container>
        <el-header height="64px" class="header-container">
          <div class="header-content">
            <!-- 网站Logo和名称 -->
            <div class="brand-container">
              <el-avatar 
                shape="square" 
                :size="40"  
                class="brand-avatar"
              >
                <el-icon :size="20" class="text-white">
                  <Cloudy />
                </el-icon>
              </el-avatar>
              <span class="brand-name">泽山云客</span>
            </div>
          </div>
        </el-header>
      </el-container>
    </header>

    <!-- 主要内容区域 - 路由视图 -->
    <main class="app-main">
      <div class="main-container">
        <router-view />
      </div>
    </main>

    <!-- 底部信息栏 -->
    <footer class="app-footer">
      <div class="footer-container">
        <div class="footer-content">
          <!-- 品牌信息 -->
          <div class="footer-column">
            <div class="brand-container">
              <el-avatar 
                shape="square" 
                :size="32"  
                class="brand-avatar footer-avatar"
              >
                <el-icon :size="16" class="text-white">
                  <Cloudy />
                </el-icon>
              </el-avatar>
              <span class="brand-name footer-brand">泽山云客</span>
            </div>
            <p class="brand-desc">
              专注于提供高质量的云服务解决方案，助力企业数字化转型，共创智慧未来。
            </p>
          </div>
          
          <!-- 快速链接 -->
          <div class="footer-column">
            <h3 class="footer-title">快速链接</h3>
            <ul class="link-list">
              <li>
                <router-link to="/about" class="link-item">关于我们</router-link>
              </li>
              <li>
                <router-link to="/privacy" class="link-item">隐私政策</router-link>
              </li>
              <li>
                <router-link to="/terms" class="link-item">服务条款</router-link>
              </li>
              <li>
                <router-link to="/faq" class="link-item">常见问题</router-link>
              </li>
            </ul>
          </div>
          
          <!-- 联系信息 -->
          <div class="footer-column">
            <h3 class="footer-title">联系我们</h3>
            <ul class="contact-list">
              <li class="contact-item">
                <el-icon :size="18" class="contact-icon">
                  <Message />
                </el-icon>
                <span>contact@zeshanyunke.com</span>
              </li>
              <li class="contact-item">
                <el-icon :size="18" class="contact-icon">
                  <Phone />
                </el-icon>
                <span>400-777-8888</span>
              </li>
              <li class="contact-item">
                <el-icon :size="18" class="contact-icon">
                  <Location />
                </el-icon>
                <span>浙江省杭州市西湖区科技园区88号</span>
              </li>
            </ul>
          </div>
        </div>
        
        <!-- 版权信息 -->
        <div class="copyright">
          <p>&copy; {{ new Date().getFullYear() }} 泽山云客信息技术有限公司 版权所有 | 浙ICP备87654321号</p>
        </div>
      </div>
    </footer>
  </div>
</template>

<script setup lang="ts">
// 导入Element Plus图标
import { Cloudy, Message, Phone, Location } from '@element-plus/icons-vue';
// 导入Element Plus组件
import { ElHeader, ElContainer, ElAvatar, ElIcon } from 'element-plus';
</script>

<style scoped>
/* 全局布局基础样式 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f9fafb;
}

/* 顶部导航样式 */
.app-header {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
  padding: 0 16px;
  height: 100%;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* 品牌标识样式 */
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  background-image: linear-gradient(135deg, #2563eb, #4f46e5);
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
}

/* 主要内容区域样式 */
.app-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 32px 0;
}

.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 底部样式 */
.app-footer {
  background-color: #1f2937;
  color: #d1d5db;
  margin-top: auto;
  padding: 48px 0 24px;
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px;
}

/* 底部品牌样式 */
.footer-avatar {
  background-image: linear-gradient(135deg, #3b82f6, #6366f1);
}

.footer-brand {
  color: #ffffff;
  font-size: 1rem;
}

.brand-desc {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.6;
  margin: 8px 0 0;
}

/* 链接列表样式 */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  font-size: 0.875rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.link-item:hover {
  color: #3b82f6;
}

/* 联系信息样式 */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.contact-icon {
  color: #3b82f6;
  margin-top: 4px;
}

/* 版权信息样式 */
.copyright {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}
</style>